<HTML><HEAD><TITLE>integral_t(?X, ?Epsilon, +MC)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(tentative_constraints)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>integral_t(?X, ?Epsilon, +MC)</H1>
Tentative value implementation of approximate integrality
<DL>
<DT><EM>X</EM></DT>
<DD>Tentative variables
</DD>
<DT><EM>Epsilon</EM></DT>
<DD>Allowed deviation from integrality
</DD>
<DT><EM>MC</EM></DT>
<DD>A monitored_constraint descriptor
</DD>
</DL>
<H2>Description</H2>

	<P>
    	Tentative value implementation of approximate integrality constraint.
	</P><P>
	The violatedness of the constraint is 0 if X's value is within
	tolerance Epsilon of the nearest integers, 1 otherwise.
	</P><P>
	The following declaration is in effect, meaning that integral_t/3
	is used whenever integral/2 is added to a constraint set:
	<PRE>
	:- integral_t/3 tent_implements integral/2.
	</PRE>
	</P>
    
<H3>Modes and Determinism</H3><UL>
<LI>integral_t(?, ?, +) is det
</UL>
<H2>Examples</H2>
<PRE>
    ?- X tent_set 3.2, CS :~ integral(X, 0.1).
    X = X{3.2 -&gt; 0}
    CS = constraint_set(TotalVio{1 -&gt; 0}, ...)
    There is 1 delayed goal.
    Yes (0.00s cpu)

    ?- X tent_set 3.2, CS :~ integral(X, 0.1), X tent_set 3.01.
    X = X{3.01 -&gt; 0}
    CS = constraint_set(TotalVio{0 -&gt; 0}, ...)
    There is 1 delayed goal.
    Yes (0.00s cpu)
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/tentative_constraints/eq_t-3.html">eq_t / 3</A>, <A HREF="../../lib/tentative_constraints/neq_t-3.html">neq_t / 3</A>, <A HREF="../../lib/tentative/tent_implements-2.html">tentative : tent_implements / 2</A>
</BODY></HTML>
